apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

apply plugin: 'kotlin-kapt'
apply plugin: 'realm-android'
apply plugin: "androidx.navigation.safeargs.kotlin"
def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {

   signingConfigs {
       release {
            storeFile file(keystoreProperties['storeFile'])
            storePassword keystoreProperties['storePassword']
            keyAlias keystoreProperties['keyAlias']
            keyPassword keystoreProperties['keyPassword']
       }
   }
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8.toString()
    }
    defaultConfig {
        applicationId "net.pokurt.aniryu"
        minSdkVersion 22
        targetSdkVersion 29
        versionCode 10
        versionName "0.1.0"
        vectorDrawables.useSupportLibrary = true
        archivesBaseName = "aniryu-v$versionName"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    buildTypes {
        release {
           signingConfig signingConfigs.release
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        debug{
           signingConfig signingConfigs.release
        }
    }
    splits {

        // Configures multiple APKs based on ABI.
        abi {

            // Enables building multiple APKs per ABI.
            enable true

            // By default all ABIs are included, so use reset() and include to specify that we only
            // want APKs for x86 and x86_64.

            // Resets the list of ABIs that Gradle should create APKs for to none.
            reset()

            // Specifies a list of ABIs that Gradle should create APKs for.
            include "x86", "armeabi-v7a", "arm64-v8a", "x86_64"

            // Specifies that we do not want to also generate a universal APK that includes all ABIs.
            universalApk true
        }
    }

}

dependencies {
    implementation 'org.conscrypt:conscrypt-android:2.4.0'
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'androidx.core:core-ktx:1.3.2'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    //Card View
    implementation "androidx.cardview:cardview:1.0.0"
    implementation "androidx.recyclerview:recyclerview:1.1.0"

    //For HTML Parsing
    implementation 'org.jsoup:jsoup:1.11.3'

    //For Network Request
    implementation 'com.squareup.retrofit2:retrofit:2.3.0'
    implementation 'com.squareup.okhttp3:okhttp:3.12.12'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.12.12'

    //For Managing Memory Leaks & Data
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
    implementation 'io.reactivex.rxjava2:rxjava:2.2.6'
    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'

    //Logging Library
    implementation 'com.jakewharton.timber:timber:4.7.1'

    //Epoxy For Complex Recycler View
    implementation 'com.airbnb.android:epoxy:3.8.0'
    kapt 'com.airbnb.android:epoxy-processor:3.8.0'

    //For Image Loading
    implementation 'com.github.bumptech.glide:glide:4.10.0'
    kapt 'com.github.bumptech.glide:compiler:4.10.0'
    implementation 'com.github.bumptech.glide:okhttp3-integration:4.10.0'

    //Flow layout
    implementation 'org.apmem.tools:layouts:1.10@aar'

    //Exo Player
    implementation 'com.google.android.exoplayer:exoplayer:2.10.8'
    implementation 'com.google.android.exoplayer:extension-mediasession:2.10.8'
    implementation 'com.google.android.exoplayer:extension-okhttp:2.10.8'

    //Expandable TextView
    implementation 'com.ms-square:expandableTextView:0.1.4'

    //POJO
    implementation 'com.google.code.gson:gson:2.8.6'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'

    //Navigation Library
    def nav_version = "2.3.5"
    implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
    implementation "androidx.navigation:navigation-ui-ktx:$nav_version"

    //Apache Commons
    implementation 'org.apache.commons:commons-lang3:3.11'
    implementation 'org.mozilla:rhino:1.7.13'

    implementation 'com.simplecityapps:recyclerview-fastscroll:2.0.1'
    implementation 'com.github.MurtadhaS:AppUpdater:2.7'

}
